﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContentTypeManager.aspx.cs" Inherits="EPiBoost.Core.Plugins.Gui.Admin.ContentTypeManager.ContentTypeManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Exception viewer</title>
    <!-- Mimic Internet Explorer 7 -->
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <%
        var cmsPath = EPiServer.Configuration.Settings.Instance.UIUrl.ToString();
        var shellPath = cmsPath.Replace("/CMS/", "/Shell/");
    %>

	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link rel="stylesheet" type="text/css" href="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/epi/themes/legacy/ShellCore.css") %>" />
    <script type="text/javascript" src="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/ShellCore.js") %>"></script>
    <link rel="stylesheet" type="text/css" href="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/epi/themes/legacy/ShellCoreLightTheme.css") %>" />
    <script type="text/javascript" src="<%= ResolveUrl(cmsPath  + "1.0.431/ClientResources/ReportCenter/ReportCenter.js") %>"></script>
    <link type="text/css" rel="stylesheet" href="<%= ResolveUrl(cmsPath + "1.0.431/ClientResources/Epi/Base/CMS.css") %>" />

    <script type="text/javascript">
        function CheckboxSelectAll(checked) {
            var allInputs = document.getElementsByTagName("input");
            for (var i = 0, max = allInputs.length; i < max; i++) {
                if (allInputs[i].type === 'checkbox' && allInputs[0].className.indexOf("controller") == -1) {
                    allInputs[i].checked = checked;
                }
            }
        }
    </script>


</head>
<body>
    <form id="HtmlForm" runat="server">

        <div class="epi-contentContainer epi-padding" style="max-width: 100%">
            <div class="epi-contentArea">
                <h1>Content Type Manager</h1>

                Select All :
                <input type="checkbox" class="controller" onclick="CheckboxSelectAll(this.checked)" />
                <br />
                <br />

                <div>
                    <asp:Repeater runat="server" ID="rptContentTypes">
                        <ItemTemplate>
                            <div class="content-type">
                                <asp:HiddenField runat="server" ID="hdnContentTypeGuid" />
                                <h2><%# Eval("ContentTypeName") %> (<%# Eval("ContentTypeDescription") %>)</h2>

                                <div class="content-properties">
                                    <table class="epi-default epi-table-sortable">
                                        <thead>
                                            <tr>
                                                <th>Name</th>
                                                <th>Edit Caption</th>
                                                <th>Type</th>
                                                <th>Exists in code</th>
                                                <th>Remove</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <asp:Repeater runat="server" ID="rptContentProperties">
                                                <ItemTemplate>
                                                    <tr>
                                                        <td><%# Eval("PropertyName") %></td>
                                                        <td><%# Eval("EditCaption") %></td>
                                                        <td><%# Eval("TypeName") %></td>
                                                        <td><%# Eval("ExistsOnModel") %></td>
                                                        <td>
                                                            <asp:CheckBox runat="server" ID="chkRemove" /><asp:HiddenField runat="server" ID="hdnPropertyId" />
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </tbody>
                                    </table>
                                </div>

                            </div>
                        </ItemTemplate>
                    </asp:Repeater>

                    <asp:Button runat="server" Text="Remove Selected Properties" ID="btnRemove" />

                </div>
            </div>
        </div>
    </form>
</body>
</html>
